var dtree;
var $;
var table;
var layer;
var form;
layui.extend({
    dtree:'../layui/layui_ext/dtree/dtree'
}).use(['dtree','table','element','layer'],function() {
    dtree = layui.dtree;
    $ = layui.jquery;
    table = layui.table;
    layer = layui.layer;
    form = layui.form;

    function resolvingDate(date){
        var d = new Date(date);
        var month = (d.getMonth() + 1) < 10 ? '0'+(d.getMonth() + 1) : (d.getMonth() + 1);
        var day = d.getDate()<10 ? '0'+d.getDate() : d.getDate();
        var hours = d.getHours()<10 ? '0'+d.getHours() : d.getHours();
        var min = d.getMinutes()<10 ? '0'+d.getMinutes() : d.getMinutes();
        var sec = d.getSeconds()<10 ? '0'+d.getSeconds() : d.getSeconds();
        times=d.getFullYear() + '-' + month + '-' + day + ' ' + hours + ':' + min + ':' + sec;
        return times;
    };
    var id=$("#courseid").val();
    $.ajax({
        url:"/SyteacherSelController/SeRecord",
        type:"post",
        dataType:"json",
        data:{"courseid":id,"type":2},
        success:function(data){
            var ht="";
            for(var a=0;a<data.data.length;a++){
                ht+=("<tr><td style='width:150px'>"+resolvingDate(data.data[a].implement_date)+"</td><td style='width:100px'>"+data.data[a].username+"</td><td style='width:70px'>"+data.data[a].result+"</td><td>"+data.data[a].details+"</td></tr>")
            }
            $("#tboby_id").html(ht);
        }
    });
})